#import "DmPage.h"
#import "DvDocViewer.h"
#import "DmDocument.h"
#import "DvOverlayView.h"

//@class DmPage;
//@class DvDocViewer;
//@class DmDocument;
//@class DvOverlayView;


@interface DvPageView : UIView<IDvPageView>

@property (nonatomic,retain) DvDocViewer* dviewer;
@property (nonatomic,retain) DmDocument* document;
@property (nonatomic,retain) DmPage* page;
@property (nonatomic,retain) DvOverlayView *overlayView;
@property (nonatomic,assign) int index;
@property (nonatomic,assign) float scale;
@property (nonatomic,assign) int width;
@property (nonatomic,assign) int height;
@property (nonatomic,assign) BOOL needDraw;
@property (nonatomic,assign) BOOL isRemoved;

@property (nonatomic,assign) DrawWithAnnot drawWithAnnot;


- (DmPage* )getPage;
- (UIView*)getView;

- (float)getWidth;
- (float)getHeight;

- (void)invalidate:(CGRect)rect;
- (void)invalidateForModify:(CGRect)rect;

- (void)invalidate:(CGRect)rect WithDraw:(DrawWithAnnot)drawWithAnnot;

- (CGPoint)convertPdfPtToPageViewPt:(FSPointF*)point;
- (FSPointF*)convertPageViewPtToPdfPt:(CGPoint)point;
- (FSRectF *)convertPageViewRectToPdfRect:(CGRect)rect;
- (float)pdfToPageViewLineWidth:(float)width;
- (float)pageViewToPdfLineWidth:(float)width;
- (CGRect)convertPdfRectToPageViewRect:(FSRectF *)rect;
- (id)initWithFrame:(CGRect)frame docviewer:(DvDocViewer*)dviewer document:(DmDocument*)doc index:(int)index scale:(CGFloat)scale;
- (void)setTransparentBackground;
- (void)clearTransparentBackground;
- (void)onDrawPageViewToOverlayView:(DvOverlayView*)overlayView context:(CGContextRef)context clipBox:(CGRect)clipBox;


@end
